package com.masterclient.app.modules.aftersale.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.eoner.baselibrary.bean.aftersale.ShipmentsBean;
import com.masterclient.app.R;

import java.util.List;

/**
 * @auther hjian
 * @date 2020/9/22.
 */
public class LogisticsCompanyAdapter extends BaseQuickAdapter<ShipmentsBean.DataBean.ShShipmentCompanysBean, BaseViewHolder> {

    public LogisticsCompanyAdapter(@Nullable List<ShipmentsBean.DataBean.ShShipmentCompanysBean> data) {
        super(R.layout.item_logistics_company,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShipmentsBean.DataBean.ShShipmentCompanysBean item) {
        helper.setText(R.id.item_logistics_company_name,item.getSh_name())
                .setGone(R.id.item_logistics_company_line, helper.getAdapterPosition()!=getItemCount()-1);
    }
}
